import api from "../../api/index"
import { GET_USER_DATA } from "../actionType"

export const getUserData = () => {
    return (dispatch) => {
        api.getUser().then(res => {
            console.log(res, "res");
            dispatch({
                type: GET_USER_DATA,
                payload: res.body
            })
        })
    }

}